package com.dnb.webmash.playmaker.client;

import java.util.ArrayList;
import java.util.LinkedHashSet;
import com.dnb.webmash.playmaker.shared.LoginInfo;
import com.dnb.webmash.playmaker.shared.MediaType;
import com.dnb.webmash.playmaker.shared.PlayerConfig;
import com.dnb.webmash.playmaker.shared.PlayerType;
import com.dnb.webmash.playmaker.shared.PlaylistItem;
import com.google.appengine.api.datastore.Text;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface WebPlaylistServiceAsync {
	
	void requestPlaylist(String input, int levels, Boolean mediaOnly,
			String requestID, Text docText, ArrayList<MediaType> allowedMedia,
			AsyncCallback<PlaylistItem> callback);

	void requestAllPlayTypes(AsyncCallback<ArrayList<MediaType>> asyncCallback);

	void requestLoadCurUserPls(AsyncCallback<PlaylistItem> callback);

	void requestSaveUserPls(LinkedHashSet<PlaylistItem> toSave,
			LoginInfo ownersLogin, AsyncCallback<Boolean> asyncCallback);

	void requestDefaultConfigs(PlayerType type,
			AsyncCallback<PlayerConfig> asyncCallback);

	void requestLoadUserConfigs(PlayerType type,
			AsyncCallback<PlayerConfig> asyncCallback);

	void requestLoadGlobalPls(AsyncCallback<PlaylistItem> callback);

	void storeIfNotAlready(ArrayList<PlaylistItem> plsToStore, String owner,
			AsyncCallback<Boolean> callback);

	void requestLoadPls(ArrayList<String> request,
			AsyncCallback<ArrayList<PlaylistItem>> callback);

	void resumeRecursion(PlaylistItem empty, Boolean mediaOnly,
			String requestID, Text docText, ArrayList<MediaType> allowedMedia,
			AsyncCallback<PlaylistItem> callback);

	void requestCreateNewMedia(MediaType nT,
			AsyncCallback<Boolean> asyncCallback);

	void requestDoc(String reqURL, AsyncCallback<Text> callback);

}
